/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InQuestPickupTask extends BasicModel<InQuestPickupTask> {
  taskId?: number; // 任务id
  taskTypeCode?: string; // 任务类型code
  taskTypeName?: string; // 任务类型名称
  taskStatus?: string; // 任务状态
  enterpriseCode?: string; // 所属企业code
  enterpriseName?: string; // 所属企业名称
  roleCode?: string; // 角色code
  roleName?: string; // 角色名称
  receptionHumanId?: string; // 领取人id
  receptionHumanName?: string; // 领取人姓名
  addTime?: string; // 创建时间
  updateTime?: string; // 更新时间
  receiveTime?: string; // 领取时间
  finishTime?: string; // 完成时间
  pushTime?: string; // 推送时间
  inspectionId?: string; // 视频记录id
  videoUrl?: string; // 视频地址
  feedBack?: string; // 任务反馈
  abnormal?: string; // 是否有隐患
  abnormalTotal?: string; // 隐患数量
  deleted?: string; // 是否删除
}

export const inQuestPickupTaskList = (params?: InQuestPickupTask | any) =>
  defHttp.get<InQuestPickupTask>({ url: adminPath + '/inspectionmanag/inTaskCollection/list', params });

export const inQuestPickupTaskListData = (params?: InQuestPickupTask | any) =>
  defHttp.post<Page<InQuestPickupTask>>({ url: adminPath + '/inspectionmanag/inTaskCollection/listData', params });

export const inQuestPickupTaskForm = (params?: InQuestPickupTask | any) =>
  defHttp.get<InQuestPickupTask>({ url: adminPath + '/inspectionmanag/inTaskCollection/form', params });

export const inQuestPickupTaskSave = (params?: any, data?: InQuestPickupTask | any) =>
  defHttp.post<InQuestPickupTask>({ url: adminPath + '/inspectionmanag/inTaskCollection/save', params, data });

export const inQuestPickupTaskDelete = (params?: InQuestPickupTask | any) =>
  defHttp.get<InQuestPickupTask>({ url: adminPath + '/inspectionmanag/inTaskCollection/delete', params });
